import 'package:my_app_01/model/Role.dart';

class UserModel {
  String? id;
  String? code;
  String? account;
  String? recuserid;
  String? mobile;
  String? email;
  String? avatarurl;
  String? holdertype;
  String? departid;
  String? departname;
  String? currdepartid;
  String? currdepartname;
  String? orgdepartid;
  String? orgdepartname;
  int? userbittype;
  int? authbittype;
  String? name;
  String? nickname;
  String? sextype;
  String? birthday;
  String? areacode;
  String? address;
  String? channeltype;
  String? ismodifiedpassword;
  dynamic? column1;
  dynamic? column2;
  String? column3;
  dynamic? column4;
  dynamic? column5;
  dynamic? column6;
  dynamic? column7;
  dynamic? column8;
  dynamic? column9;
  dynamic? column10;
  String? istester;
  String? isdeveloper;
  String? isdepartadmin;
  dynamic? subdepartnames;
  dynamic? subdepartidsStr;
  dynamic? postnames;
  dynamic? postidsStr;
  List<RoleModel>? roleList;
  String? orgdeparttype;
  String? currdeparttype;
  String? orgdepartareacode;
  dynamic? orgdepartlocalareacode;
  String? currdepartareacode;
  dynamic? currdepartlocalareacode;
  String? isclaimclass;

  UserModel({
    this.id,
    this.code,
    this.account,
    this.recuserid,
    this.mobile,
    this.email,
    this.avatarurl,
    this.holdertype,
    this.departid,
    this.departname,
    this.currdepartid,
    this.currdepartname,
    this.orgdepartid,
    this.orgdepartname,
    this.userbittype,
    this.authbittype,
    this.name,
    this.nickname,
    this.sextype,
    this.birthday,
    this.areacode,
    this.address,
    this.channeltype,
    this.ismodifiedpassword,
    this.column1,
    this.column2,
    this.column3,
    this.column4,
    this.column5,
    this.column6,
    this.column7,
    this.column8,
    this.column9,
    this.column10,
    this.istester,
    this.isdeveloper,
    this.isdepartadmin,
    this.subdepartnames,
    this.subdepartidsStr,
    this.postnames,
    this.postidsStr,
    this.roleList,
    this.orgdeparttype,
    this.currdeparttype,
    this.orgdepartareacode,
    this.orgdepartlocalareacode,
    this.currdepartareacode,
    this.currdepartlocalareacode,
    this.isclaimclass,
  });



  UserModel.fromJson(dynamic json) {
    id = json['id'];
    code = json['code'];
    account = json['account'];
    recuserid = json['recuserid'];
    mobile = json['mobile'];
    email = json['email'];
    avatarurl = json['avatarurl'];
    holdertype = json['holdertype'];
    departid = json['departid'];
    departname = json['departname'];
    currdepartid = json['currdepartid'];
    currdepartname = json['currdepartname'];
    orgdepartid = json['orgdepartid'];
    orgdepartname = json['orgdepartname'];
    userbittype = json['userbittype'];
    authbittype = json['authbittype'];
    name = json['name'];
    nickname = json['nickname'];
    sextype = json['sextype'];
    birthday = json['birthday'];
    areacode = json['areacode'];
    address = json['address'];
    channeltype = json['channeltype'];
    ismodifiedpassword = json['ismodifiedpassword'];
    column1 = json['column1'];
    column2 = json['column2'];
    column3 = json['column3'];
    column4 = json['column4'];
    column5 = json['column5'];
    column6 = json['column6'];
    column7 = json['column7'];
    column8 = json['column8'];
    column9 = json['column9'];
    column10 = json['column10'];
    istester = json['istester'];
    isdeveloper = json['isdeveloper'];
    isdepartadmin = json['isdepartadmin'];
    subdepartnames = json['subdepartnames'];
    subdepartidsStr = json['subdepartidsStr'];
    postnames = json['postnames'];
    postidsStr = json['postidsStr'];
    if (json['roleList'] != null) {
      roleList = [];
      json['roleList'].forEach((v) {
        roleList?.add(RoleModel.fromJson(v));
      });
    }
    orgdeparttype = json['orgdeparttype'];
    currdeparttype = json['currdeparttype'];
    orgdepartareacode = json['orgdepartareacode'];
    orgdepartlocalareacode = json['orgdepartlocalareacode'];
    currdepartareacode = json['currdepartareacode'];
    currdepartlocalareacode = json['currdepartlocalareacode'];
    isclaimclass = json['isclaimclass'];
  }

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['code'] = code;
    map['account'] = account;
    map['recuserid'] = recuserid;
    map['mobile'] = mobile;
    map['email'] = email;
    map['avatarurl'] = avatarurl;
    map['holdertype'] = holdertype;
    map['departid'] = departid;
    map['departname'] = departname;
    map['currdepartid'] = currdepartid;
    map['currdepartname'] = currdepartname;
    map['orgdepartid'] = orgdepartid;
    map['orgdepartname'] = orgdepartname;
    map['userbittype'] = userbittype;
    map['authbittype'] = authbittype;
    map['name'] = name;
    map['nickname'] = nickname;
    map['sextype'] = sextype;
    map['birthday'] = birthday;
    map['areacode'] = areacode;
    map['address'] = address;
    map['channeltype'] = channeltype;
    map['ismodifiedpassword'] = ismodifiedpassword;
    map['column1'] = column1;
    map['column2'] = column2;
    map['column3'] = column3;
    map['column4'] = column4;
    map['column5'] = column5;
    map['column6'] = column6;
    map['column7'] = column7;
    map['column8'] = column8;
    map['column9'] = column9;
    map['column10'] = column10;
    map['istester'] = istester;
    map['isdeveloper'] = isdeveloper;
    map['isdepartadmin'] = isdepartadmin;
    map['subdepartnames'] = subdepartnames;
    map['subdepartidsStr'] = subdepartidsStr;
    map['postnames'] = postnames;
    map['postidsStr'] = postidsStr;
    if (roleList != null) {
      map['roleList'] = roleList?.map((v) => v.toJson()).toList();
    }
    map['orgdeparttype'] = orgdeparttype;
    map['currdeparttype'] = currdeparttype;
    map['orgdepartareacode'] = orgdepartareacode;
    map['orgdepartlocalareacode'] = orgdepartlocalareacode;
    map['currdepartareacode'] = currdepartareacode;
    map['currdepartlocalareacode'] = currdepartlocalareacode;
    map['isclaimclass'] = isclaimclass;
    return map;
  }
}
